import sys
if __name__ == '__main__':
    try:
        from gi.repository import Unity
        ins = Unity.Inspector.get_default()
        if not ins.get_property('unity-running'):
            print 'error'
            sys.exit(47)
    except ImportError:
        sys.exit(47)
    except Exception:
        sys.exit(47)